package com.bstek.u.uflo;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.PlatformTransactionManager;

import com.bstek.uflo.env.EnvironmentProvider;

/**
 * 
 * @author Andy
 *
 */
@Component(EnvironmentProviderImpl.BEAN_ID)
public class EnvironmentProviderImpl implements EnvironmentProvider{
	
	public static final String BEAN_ID = "uflo.environmentProviderImpl";
	
	@Autowired
	private SessionFactory sessionFactory;
	
	@Autowired
	private PlatformTransactionManager transactionManager;

	@Override
	public String getCategoryId() {
		return "bstek";
	}

	@Override
	public String getLoginUser() {
		return "anonymous";
	}

	@Override
	public PlatformTransactionManager getPlatformTransactionManager() {
		return transactionManager;
	}

	@Override
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

}
